473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Automatic caching and dependency evaluation among variables?

I *think* I saw a post some time ago enabling "spreadsheet" like
computations, that allows something along the lines of:
vars.a = 10
vars.b = dependency("vars.a * 20")
print vars.b 200 vars.a = 50
print vars.b

1000

(Not sure what the actual syntax definitions were)
And vars.b was only re-computed if vars.a was changed -
otherwise a cached value was returned.

I can write this myself, but the solution I'm thinking of is
inelegant, and I remember the solution was extremely short and
elegant; I can't find anything in the google archives, though.

Anyone perhaps have a link or other helpful info?

(My idea of how to do it: make vars a special dict that logs
every __get__, and that can have callbacks when something is
__set__. the dependency() code would evaluate the expression,
see what __get__s were logged, and attach the same expression to
be reevaluated when any of those were __set__.

It becomes complicated, though, if I wish to track changes to
vars.subvar1.subvar2.subvar3 as well, though).
Jul 18 '05 #1
0 999

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Greg Collins [MVP] | last post by:
Hi, I couldn't find what I was looking for by searching the newsgroup, but perhaps these have already been discussed somewhere. This is a bit long with a lot of interrelated questions. What I've...
0
by: Rick Hein | last post by:
I've got a problem with an app I've been working on, the Caching object and events not firing correctly. In a nutshell: When I'm debugging, and I set a breakpoint in the removed item call back, the...
2
by: Nalaka | last post by:
Hi, I have the following requirement for caching a asp.net 2.0 page. Can some one please tell me if this is possible.... and a some direction would also be wonderful I have a ASP.net 2.0...
0
by: Jonaed | last post by:
Hello, I am having a problem with caching, or at least I think it is with caching. I have a simple <%= "text " + DateTime.Now.ToString() %> in one of my aspx files (that is included thru the...
1
by: thedotnetarchitect | last post by:
To keep the background simple here is my problem, I have two web servers in a web farm I would like to have a centralized caching system on another server, where I can add and remove items from...
6
by: Rolf Welskes | last post by:
Hello, I want to partial cache by using a UserControl. Now I have a file dependency. In msdn I see it is not possible to do it the same way as in a page. The only information is to create a...
58
by: Jorge Peixoto de Morais Neto | last post by:
I was reading the code of FFmpeg and it seems that they use malloc just too much. The problems and dangers of malloc are widely known. Malloc also has some overhead (although I don't know what is...
0
by: Bogdan | last post by:
Hi, I find on-line docs a bit confusing when it comes to sql dependency caching. There is a lot of info on how to configure it for SQL Server 7/2000. The info is usually followed by statements...
25
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.